package session.stateless.beans;

import javax.ejb.Stateless;

import org.jboss.ejb3.annotation.LocalBinding;

import session.stateless.Performance;

/**
 * Session Bean implementation class PerformanceBean
 */
@Stateless
@LocalBinding(jndiBinding="Performance")
public class PerformanceBean implements Performance {

	public long TIME;
    /**
     * Default constructor. 
     */
    public PerformanceBean() {
    }

	public long getTime() {
		long realTime = System.currentTimeMillis()-this.TIME;
    	//System.out.print("tempo  "+TIME);
		return realTime;
	}

	public void setTime() {
    	//System.out.print("tempo  "+TIME);
		this.TIME=System.currentTimeMillis();
	}
}
